## All Tables for Brother and Burden

rm(list = ls())


library(foreign)
library(car)
library(plyr)
library(dplyr)
install.packages("stargazer")
library(stargazer)

mydata <- read.dta("final data.dta")
na.omit(mydata)
attach(mydata)


## Table 1: Main Results 

m1 <- lm(shouldstay  ~ treatment1 + treatment2 + treatment3 + t1_t3 + t2_t3, data = mydata)
summary(m1)

m2 <- lm(spend_ref  ~ treatment1 + treatment2 + treatment3 + t1_t3 + t2_t3, data = mydata)
summary(m2)

m3 <- lm(trust_ref  ~ treatment1 + treatment2 + treatment3 + t1_t3 + t2_t3, data = mydata)
summary(m3)

m4 <- lm(neighborhood_ref  ~ treatment1 + treatment2 + treatment3 + t1_t3 + t2_t3, data = mydata)
summary(m4)

m5 <- lm(donation  ~ treatment1 + treatment2 + treatment3 + t1_t3 + t2_t3, data = mydata)
summary(m5)

m6 <- lm(support_general ~ treatment1 + treatment2 + treatment3 + t1_t3 + t2_t3, data = mydata)
summary(m6)

stargazer(m1, m2, m3, m4, m5,m6, title="Average Treatment Effects of Religious Primes, Economic Cost Information and their Interactions on Measures of Prejudice Against Syrian Refugees", align=TRUE)


## Table 2: Treatment Effects with Covariate Adjustment 

m3.1 <- lm(shouldstay  ~ treatment1 + treatment2 + treatment3 + t1_t3 + t2_t3 + age + education + unemployed + income_real + religiosity_dummy + contact_ref + Gaziantep, data = mydata)
summary(m3.1)

m3.2 <- lm(spend_ref  ~ treatment1 + treatment2 + treatment3 + t1_t3 + t2_t3 + age + education + unemployed + income_real + religiosity_dummy + contact_ref + Gaziantep, data = mydata)
summary(m3.2)

m3.3 <- lm(trust_ref  ~ treatment1 + treatment2 + treatment3 + t1_t3 + t2_t3 +  age + education + unemployed + income_real + religiosity_dummy + contact_ref + Gaziantep, data = mydata)
summary(m3.3)

m3.4 <- lm(neighborhood_ref  ~ treatment1 + treatment2 + treatment3 + t1_t3 + t2_t3 + age + education + unemployed + income_real + religiosity_dummy + contact_ref + Gaziantep, data = mydata)
summary(m3.4)

m3.5 <- lm(donation  ~ treatment1 + treatment2 + treatment3 + t1_t3 + t2_t3 + age + education + unemployed + income_real + religiosity_dummy + contact_ref + Gaziantep, data = mydata)
summary(m3.5)

m3.6 <- lm(support_general ~ treatment1 + treatment2 + treatment3 + t1_t3 + t2_t3 + age + education + unemployed + income_real + religiosity_dummy + contact_ref + Gaziantep, data = mydata)
summary(m3.6)

stargazer(m3.1, m3.2, m3.3, m3.4, m3.5,m3.6, title="Average Treatment Effects with Covariate Adjustment", align=TRUE)







## Table 1A: Descriptive Statistics

stargazer(mydata)


## Table 2A: Non-Experimental Predictors of Prejudice Against Syrian Refugees 

m2.1 <- lm(shouldstay  ~ age + education + unemployed + income_real + religiosity_dummy + contact_ref + Gaziantep, data = mydata)
summary(m2.1)

m2.2 <- lm(spend_ref  ~ age + education + unemployed + income_real + religiosity_dummy + contact_ref + Gaziantep, data = mydata)
summary(m2.2)

m2.3 <- lm(trust_ref  ~ age + education + unemployed + income_real + religiosity_dummy + contact_ref + Gaziantep, data = mydata)
summary(m2.3)

m2.4 <- lm(neighborhood_ref  ~ age + education + unemployed + income_real + religiosity_dummy + contact_ref + Gaziantep, data = mydata)
summary(m2.4)

m2.5 <- lm(donation  ~ age + education + unemployed + income_real + religiosity_dummy + contact_ref + Gaziantep, data = mydata)
summary(m2.5)

m2.6 <- lm(support_general ~ age + education + unemployed + income_real + religiosity_dummy + contact_ref + Gaziantep, data = mydata)
summary(m2.6)

stargazer(m2.1, m2.2, m2.3, m2.4, m2.5,m2.6, title="Non-Experimental Predictors of Prejudice Against Syrian Refugees", align=TRUE)


## Table 3A: Average Treatment Effects with Covariate Adjustment and Enumerator Fixed Effects

m4.1 <- lm(shouldstay  ~ treatment1 + treatment2 + treatment3 + t1_t3 + t2_t3 + age + education + unemployed + income_real + religiosity_dummy + contact_ref + factor(enumerator), data = mydata)
summary(m4.1)

m4.2 <- lm(spend_ref  ~ treatment1 + treatment2 + treatment3 + t1_t3 + t2_t3 + age + education + unemployed + income_real + religiosity_dummy + contact_ref + factor(enumerator), data = mydata)
summary(m4.2)

m4.3 <- lm(trust_ref  ~ treatment1 + treatment2 + treatment3 + t1_t3 + t2_t3 +  age + education + unemployed + income_real + religiosity_dummy + contact_ref + factor(enumerator), data = mydata)
summary(m4.3)

m4.4 <- lm(neighborhood_ref  ~ treatment1 + treatment2 + treatment3 + t1_t3 + t2_t3 + age + education + unemployed + income_real + religiosity_dummy + contact_ref + factor(enumerator), data = mydata)
summary(m4.4)

m4.5 <- lm(donation  ~ treatment1 + treatment2 + treatment3 + t1_t3 + t2_t3 + age + education + unemployed + income_real + religiosity_dummy + contact_ref + factor(enumerator), data = mydata)
summary(m4.5)

m4.6 <- lm(support_general ~ treatment1 + treatment2 + treatment3 + t1_t3 + t2_t3 + age + education + unemployed + income_real + religiosity_dummy + contact_ref + factor(enumerator), data = mydata)
summary(m3.6)

stargazer(m4.1, m4.2, m4.3, m4.4, m4.5,m4.6, title="Average Treatment Effects with Covariate Adjustment and Enumerator Fixed Effects", align=TRUE)


